package com.qingcloud.adminbackend.entity.app;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;

@Data
@TableName("df_job_component_instance_outmapping")
public class JobComponentInstanceOutMapping {

    @TableId(type = IdType.INPUT)
    private Integer id;

    /**
     * 组件实例ID
     */
    @TableField("instance_id")
    @ApiModelProperty(value = "自增主键", example = "1")
    private Integer instanceId;

    /**
     * 输出参数来源的实例id
     */
    @TableField("from_instance_id")
    @ApiModelProperty(value = "输出参数来源的实例id", example = "1")
    @NotEmpty(message = "fromInstanceId不能为空")
    private Integer fromInstanceId;

    /**
     * 输出参数来源的实例参数id
     */
    @TableField("from_key")
    @ApiModelProperty(value = "输出参数来源的实例参数id", example = "1")
    @NotEmpty(message = "fromKey不能为空")
    private String fromKey;

    /**
     * 存储到对应的表id
     */
    @TableField("to_table_id")
    @ApiModelProperty(value = "存储到对应的表id", example = "1")
    @NotEmpty(message = "toTableId不能为空")
    private Integer toTableId;

    /**
     * 存储到对应的表字段id
     */
    @TableField("to_key")
    @ApiModelProperty(value = "存储到对应的表字段id", example = "1")
    @NotEmpty(message = "toKey不能为空")
    private String toKey;

    /**
     * 存储目标字段中文名
     */
    @ApiModelProperty(value = "存储目标字段中文名", example = "年龄")
    @NotEmpty(message = "toName不能为空")
    private String toName;

    /**
     * 存储目标字段名称
     */
    @ApiModelProperty(value = "存储目标字段名称", example = "age")
    @NotEmpty(message = "toColumnName不能为空")
    private String toColumnName;

    /**
     * 存储到对应的表字段id
     */
    @ApiModelProperty(value = "存储目标字段类型", example = "INT")
    private String toDataType;

}